package com.addplus.townmall.server.api.mapper.town;

import com.addplus.townmall.server.api.model.town.MallFeedback;
import com.addplus.townmall.server.api.model.town.expand.MallFeedbackExpand;
import com.addplus.townmall.server.api.utils.BaseAddMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 商城意见反馈表 Mapper 接口
 * </p>
 *
 * @author zhangjiehang
 * @since 2018-08-27
 */
public interface MallFeedbackMapper extends BaseAddMapper<MallFeedback> {

    @Select("SELECT m.id,m.opinion_context,m.opinion_images,m.hander_id,m.hander_opinion,m.platform,m.schedule,t.name FROM " +
            "mall_feedback m LEFT JOIN mall_feedback_type t ON m.mall_feedback_type_id=t.id WHERE t.is_deleted=0 ORDER BY m.gmt_modified")
    List<MallFeedbackExpand> getAllMallFeedbackByPage(IPage page);
}
